package com.i2works.smartluolong;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 后端API模块启动类
 *
 * @author Liu Yutao <koal@vip.qq.com>
 * @date 2017/12/11 11:35
 */
@SpringBootApplication
//扫描spring组件
@ComponentScan(basePackages = {"com.i2works.smartluolong.manageapi","com.i2works.smartluolong.manage.service","com.i2works.smartluolong.web.service","com.i2works.smartluolong.utils"})
//扫描mapper文件
@MapperScan(basePackages = {"com.i2works.smartluolong.web.dal","com.i2works.smartluolong.manage.dal"})
//开启缓存
@EnableCaching
//启动事物
@EnableTransactionManagement
public class SmartManageApiApplication {

    private static final Logger logger = LoggerFactory.getLogger(SmartManageApiApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(SmartManageApiApplication.class, args);
        logger.error("========================================================");
        logger.error("后端API模块 - 系统启动成功！");
        logger.error("========================================================");
    }


}
